package scuts.core;

import scuts.core.macros.F;

class AndPredicate0 {
  public static function and (f1:Void->Bool, f2:Void->Bool):Void->Bool
  {
    return function () return (f1() && f2());
  }
  
}

class AndPredicate1 {
  public static function and < T > (f1:T->Bool, f2:T->Bool):T->Bool
  {
    return F.n(a = f1(a) && f2(a));
  }
}



class AndPredicate2 {
  public static function and <A,B>(f1:A->B->Bool, f2:A->B->Bool):A->B->Bool
  {
    return F.n(a,b = f1(a,b) && f2(a,b));
  }
 
}